Fix Korean IME space handling on Windows#3339
Conversation
|
|
WalkthroughThis PR adds IME (Input Method Editor) handling to the terminal keydown event handler. A new guard at the start of Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Actionable comments posted: 0 |
|
Confirmed this PR works on Windows 11. I built and ran the app locally with |
Summary
Fixes a Windows-specific Korean IME composition bug in the terminal input handler.
When using the Korean IME on Windows, pressing Space while a syllable is still composing can be handled by Wave's terminal keydown path before Chromium finishes committing the composed text. In that case, the terminal can receive the Space before the final Korean
syllable, producing the wrong commit order.
This PR adds a narrow guard for that case and lets the native IME composition flow finish handling the plain Space key.
Fixes #3335
Problem
Reproduction case:
Before this change, the Space key could be processed by the terminal keydown handler before the IME composition committed the final syllable. This caused incorrect ordering in the terminal input.
Approach
The change adds an early check in
handleTerminalKeydownfor the specific IME case:When all of those are true, the handler returns early so Chromium/native IME composition can commit the text in the correct order.
The guard is intentionally narrow so normal terminal key handling, shortcuts, and non-IME Space input continue to use the existing path.
Scope
This PR changes only
frontend/app/view/term/term-model.ts.It does not include unrelated cleanup, formatting churn, refactors, or broader terminal input behavior changes.
Validation
Tested locally on Windows 11 with the Korean IME enabled.
Verified:
task devbuilds the backend/frontend and starts Electron.task electron:winquickdevlaunches correctly on Windows.Also ran:
npm exec eslint -- frontend/app/view/term/term-model.tsnpm exec prettier -- --check frontend/app/view/term/term-model.tsnpm exec tsc -- --noEmittsc --noEmitcurrently fails on existing preview mock type errors unrelated to this change.Issue
When typing Korean text with the Windows Korean IME, punctuation can be inserted before the final composed syllable is committed.
For example, when I type:
The expected behavior is that the composed Korean text should be committed in the correct order before the punctuation is inserted.
I attached a video below showing the issue.
Desktop.2026.05.29.-.01.53.51.03.mp4